package factory;

public class MainTest1 {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
//        Audi audi = CarSimpleFactory.createAudi();
//        Benz benz = CarSimpleFactory.createBenz();
//        audi.run();
//        benz.run();

//        Car audi = CarSimpleFactory.createCar("Audi");
//        Car benz = CarSimpleFactory.createCar("Benz");
//        audi.run();
//        benz.run();

        Car audi = new AudiFactory().createCar();
        Car benz = new BenzFactory().createCar();
        audi.run();
        benz.run();
    }
}
